import com.golden.gamedev.object.Background;
import com.golden.gamedev.object.Sprite;
import com.golden.gamedev.object.collision.CollisionBounds;


public class BoundCollision extends CollisionBounds{

	public BoundCollision(Background arg0) {
		super(arg0);
	}
	public BoundCollision(int x, int y, int width, int height){
		super(x,y,width,height);
	}
	@Override
	public void collided(Sprite arg0) {
		if(arg0 != null)
		{
			if(isCollisionSide(BOTTOM_COLLISION) || isCollisionSide(TOP_COLLISION))
				arg0.setVerticalSpeed(-(arg0.getVerticalSpeed()));
			if(isCollisionSide(LEFT_COLLISION)|| isCollisionSide(RIGHT_COLLISION))
				arg0.setHorizontalSpeed(-(arg0.getHorizontalSpeed()));
		}
		
	}
	
}
